package com.data.mv.mappers.mysql;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface MysqlMapper {
    @Select("select count(1) from ${tableName}")
    int countTable(@Param("tableName") String tableName);

    @Update("${sql}")
    void createTable(@Param("sql") String sql);

    @Update("drop table if exists ${tableName}")
    void dropTable(@Param("tableName") String tableName);

    @Insert("${sql}")
    void insert(@Param("sql") String sql);

    @Update("delete from ${tableName}")
    void delete(@Param("tableName") String tableName);
}
